import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(),
  //import.meta.env.BASE_URL
  routes: [
    {
      path: '/',
      redirect: '/home',

      children: [],
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('@/views/home.vue'),
    },
    {
      path: '/favor',
      name: 'favor',
      component: () => import('@/views/favor.vue'),
    },
    {
      path: '/order',
      name: 'order',
      component: () => import('@/views/order.vue'),
    },
    {
      path: '/message',
      name: 'message',
      component: () => import('@/views/message.vue'),
      meta: {
        hideTabbar: true,
      },
    },
    {
      path: '/profile',
      name: 'profile',
      component: () => import('@/views/profile.vue'),
    },
    {
      path: '/city',
      name: 'city',
      component: () => import('@/views/city/city.vue'),
      meta: {
        hideTabbar: true,
      },
    },
    {
      path: '/search',
      name: 'search',
      component: () => import('@/views/search/search.vue'),
      meta: {
        hideTabbar: true,
      },
    },
    {
      path: '/detail',
      name: 'detail',
      component: () => import('@/views/cpns/home/home-detail.vue'),

      meta: {
        hideTabbar: true,
      },
    },
  ],
})

export default router
